package re.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import re.entity.User;
import re.mapper.UserMapper;
import re.service.i.IUserService;

@Service
public class UserService implements IUserService {

    @Autowired
    private UserMapper userMapper;

    public int[] ids() {
        return userMapper.getAll().stream().mapToInt(User::getId).toArray();
    }

    public void delById(int id) {
        userMapper.delById(id);
    }
}
